<template><!--轮播图管理-->
  <div class="allBox">
    <div class="webPageTitle">轮播图管理</div>
    <div class="content-all">

    </div>

    <!--读取API错误-->
    <div style="z-index: 10000">
      <Modal v-model="redAPIModal" width="360"  id="iviw-modal">
        <p slot="header" style="color:#f60;text-align:left">
          <Icon type="information-circled"></Icon>
          <span>{{redAPIModalTit}}</span>
        </p>
        <div style="text-align:left">
          <p>错误信息：</p>
          <p>{{redAPIModalCen}}</p>
        </div>
        <div slot="footer">
          <Button type="error" size="large" long  @click="redAPIModalFun">确定</Button>
        </div>
      </Modal>

    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        redAPIModal:false,
        redAPIModalTit:'',
        redAPIModalCen:'',
      }
    },
    methods:{
      /**
       * 读取图片信息
       *
       * @param {null}  null  null
       *
       * @return {null} null  null
       * */
      selectData: function () {
        var _self = this;
        _self.$http.post(_self.service + '/image',{
          description:'',
          imgType:'',
          url:''
        } ).then(function (res) {
          if(res.data.code == '001'){

          }else{
            _self.modalFun('读取轮播图信息失败',res.data.msg)
          }
        })
      },

      /**
       * 修改图片信息
       *
       * @param {null}   null  null
       *
       * @return {null}  null null
       * */
      updateData:function () {
        var _self =this;
        _self.$http.post(_self.server + '/new/image',{
          id:'',
          description:'',
          imgType:'',
          url:''
        }).then(function (res) {
          if(res.data.code == '001'){

          }else{
            _self.modalFun('修改轮播图信息失败',res.data.msg)
          }
        })
      },

      /**
       * 报错提示信息
       *
       * @param {string} modTit  定义错误标题
       * @param {string} modCen  定义错误内容
       *
       * @return {null}  null
       * */
      modalFun:function (modTit,modCen) {
        this.redAPIModal = true;
        this.redAPIModalTit = modTit;
        this.redAPIModalCen = modCen;
      },
      redAPIModalFun:function () {
        this.redAPIModal = false
      },
    },
    created:function () {
      this.selectImg()
    }


  }
</script>
<style scoped>
  .content-all{
    float: left;
    width:100%;
  }
</style>
